#version 330 core

uniform float u_Phase;
uniform sampler2D u_BaseTexture;

in vec2 var_TexCoord;

out vec4 FragColor;












void main(void)
{
	//float var_TexCoord.s = 0.0 + var_TexCoord.s;
	//float blurFactor = 1.0/512;//cos(u_PhaseP/10)*0.005;
	vec3 color = vec3(0);
	//for (int i = -7; i < 7; ++i)
	//	for (int j = -7; j < 7; ++j)
	//		color += texture2D(u_BaseTexture, vec2(var_TexCoord.x, -var_TexCoord.y) + vec2(i, j)*blurFactor).rgb;
	// зададим цвет пикселя
	color = texture2D(u_BaseTexture, vec2(var_TexCoord.x+sin(var_TexCoord.x*100 + u_Phase*10)/300, -var_TexCoord.y+sin(var_TexCoord.y*100 + u_Phase*10)/300)).rgb;
	//FragColor = vec4(color*(1.0/(14.0*14.0)), 1.0);
	FragColor = vec4(color, 1.0);
}